// 云对象教程: https://uniapp.dcloud.net.cn/uniCloud/cloud-obj
// jsdoc语法提示教程：https://ask.dcloud.net.cn/docs/#//ask.dcloud.net.cn/article/129
module.exports = {
	_before: function() { // 通用预处理器

	},
	async getNoticeText(){
		console.log("请求查询")
		const db = uniCloud.database();
		return db.collection("db_config").where({
			type: "notice"
		}).get().then((res) => {
			return {
				code: '001',
				data: res.data
			}
		}).catch((e) => {
			console.log(e);
			return {
				code: '002',
				msg: e.message
			}
		});
	}
}